#define _CRT_SECURE_NO_WARNINGS
#include <stdio.h>

int main() {
	char input[301];
	fgets(input, 301, stdin);
	char* p = input;
	int ab = 0, number = 0;
	while (*p!='\0') {
		if (*p>='0'&&*p<='9') {
			number++;
		} else if ((*p >= 'A' && *p <= 'Z') || (*p >= 'a' && *p <= 'z')) {
			ab++;
		}
		p++;
	}
	printf("%d,%d", ab, number);
	return 0;
}